## API Report File for "@backstage/plugin-scaffolder-backend-module-github"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { createPullRequest } from 'octokit-plugin-create-pull-request';
import { GithubCredentialsProvider } from '@backstage/integration';
import { JsonObject } from '@backstage/types';
import { Octokit } from 'octokit';
import { ScmIntegrationRegistry } from '@backstage/integration';
import { ScmIntegrations } from '@backstage/integration';
import { TemplateAction } from '@backstage/plugin-scaffolder-node';

// @public
export function createGithubActionsDispatchAction(options: {
  integrations: ScmIntegrations;
  githubCredentialsProvider?: GithubCredentialsProvider;
}): TemplateAction<
  {
    repoUrl: string;
    workflowId: string;
    branchOrTagName: string;
    workflowInputs?:
      | {
          [key: string]: string;
        }
      | undefined;
    token?: string | undefined;
  },
  JsonObject
>;

// @public
export function createGithubAutolinksAction(options: {
  integrations: ScmIntegrations;
  githubCredentialsProvider?: GithubCredentialsProvider;
}): TemplateAction<
  {
    repoUrl: string;
    keyPrefix: string;
    urlTemplate: string;
    isAlphanumeric?: boolean | undefined;
    token?: string | undefined;
  },
  JsonObject
>;

// @public
export function createGithubDeployKeyAction(options: {
  integrations: ScmIntegrationRegistry;
}): TemplateAction<
  {
    repoUrl: string;
    publicKey: string;
    privateKey: string;
    deployKeyName: string;
    privateKeySecretName?: string | undefined;
    token?: string | undefined;
  },
  JsonObject
>;

// @public
export function createGithubEnvironmentAction(options: {
  integrations: ScmIntegrationRegistry;
}): TemplateAction<
  {
    repoUrl: string;
    name: string;
    deploymentBranchPolicy?:
      | {
          protected_branches: boolean;
          custom_branch_policies: boolean;
        }
      | undefined;
    customBranchPolicyNames?: string[] | undefined;
    environmentVariables?:
      | {
          [key: string]: string;
        }
      | undefined;
    secrets?:
      | {
          [key: string]: string;
        }
      | undefined;
    token?: string | undefined;
  },
  JsonObject
>;

// @public
export function createGithubIssuesLabelAction(options: {
  integrations: ScmIntegrationRegistry;
  githubCredentialsProvider?: GithubCredentialsProvider;
}): TemplateAction<
  {
    repoUrl: string;
    number: number;
    labels: string[];
    token?: string | undefined;
  },
  JsonObject
>;

// @public
export interface CreateGithubPullRequestActionOptions {
  clientFactory?: (input: {
    integrations: ScmIntegrationRegistry;
    githubCredentialsProvider?: GithubCredentialsProvider;
    host: string;
    owner: string;
    repo: string;
    token?: string;
  }) => Promise<
    Octokit & {
      createPullRequest(options: createPullRequest.Options): Promise<{
        data: {
          html_url: string;
          number: number;
          base: {
            ref: string;
          };
        };
      } | null>;
    }
  >;
  githubCredentialsProvider?: GithubCredentialsProvider;
  integrations: ScmIntegrationRegistry;
}

// @public
export function createGithubRepoCreateAction(options: {
  integrations: ScmIntegrationRegistry;
  githubCredentialsProvider?: GithubCredentialsProvider;
}): TemplateAction<
  {
    repoUrl: string;
    description?: string | undefined;
    homepage?: string | undefined;
    access?: string | undefined;
    deleteBranchOnMerge?: boolean | undefined;
    gitAuthorName?: string | undefined;
    gitAuthorEmail?: string | undefined;
    allowRebaseMerge?: boolean | undefined;
    allowSquashMerge?: boolean | undefined;
    squashMergeCommitTitle?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' | undefined;
    squashMergeCommitMessage?:
      | 'PR_BODY'
      | 'COMMIT_MESSAGES'
      | 'BLANK'
      | undefined;
    allowMergeCommit?: boolean | undefined;
    allowAutoMerge?: boolean | undefined;
    requireCodeOwnerReviews?: boolean | undefined;
    bypassPullRequestAllowances?:
      | {
          users?: string[] | undefined;
          teams?: string[] | undefined;
          apps?: string[] | undefined;
        }
      | undefined;
    requiredApprovingReviewCount?: number | undefined;
    restrictions?:
      | {
          users: string[];
          teams: string[];
          apps?: string[] | undefined;
        }
      | undefined;
    requiredStatusCheckContexts?: string[] | undefined;
    requireBranchesToBeUpToDate?: boolean | undefined;
    requiredConversationResolution?: boolean | undefined;
    repoVisibility?: 'internal' | 'private' | 'public' | undefined;
    collaborators?:
      | (
          | {
              user: string;
              access: string;
            }
          | {
              team: string;
              access: string;
            }
          | {
              username: string;
              access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
            }
        )[]
      | undefined;
    hasProjects?: boolean | undefined;
    hasWiki?: boolean | undefined;
    hasIssues?: boolean | undefined;
    token?: string | undefined;
    topics?: string[] | undefined;
    repoVariables?:
      | {
          [key: string]: string;
        }
      | undefined;
    secrets?:
      | {
          [key: string]: string;
        }
      | undefined;
    oidcCustomization?:
      | {
          useDefault: boolean;
          includeClaimKeys?: string[] | undefined;
        }
      | undefined;
    requireCommitSigning?: boolean | undefined;
  },
  JsonObject
>;

// @public
export function createGithubRepoPushAction(options: {
  integrations: ScmIntegrationRegistry;
  config: Config;
  githubCredentialsProvider?: GithubCredentialsProvider;
}): TemplateAction<
  {
    repoUrl: string;
    description?: string | undefined;
    defaultBranch?: string | undefined;
    protectDefaultBranch?: boolean | undefined;
    protectEnforceAdmins?: boolean | undefined;
    gitCommitMessage?: string | undefined;
    gitAuthorName?: string | undefined;
    gitAuthorEmail?: string | undefined;
    requireCodeOwnerReviews?: boolean | undefined;
    dismissStaleReviews?: boolean | undefined;
    bypassPullRequestAllowances?:
      | {
          users?: string[];
          teams?: string[];
          apps?: string[];
        }
      | undefined;
    requiredApprovingReviewCount?: number | undefined;
    restrictions?:
      | {
          users: string[];
          teams: string[];
          apps?: string[];
        }
      | undefined;
    requiredStatusCheckContexts?: string[] | undefined;
    requireBranchesToBeUpToDate?: boolean | undefined;
    requiredConversationResolution?: boolean | undefined;
    sourcePath?: string | undefined;
    token?: string | undefined;
    requiredCommitSigning?: boolean | undefined;
  },
  JsonObject
>;

// @public
export function createGithubWebhookAction(options: {
  integrations: ScmIntegrationRegistry;
  defaultWebhookSecret?: string;
  githubCredentialsProvider?: GithubCredentialsProvider;
}): TemplateAction<
  {
    repoUrl: string;
    webhookUrl: string;
    webhookSecret?: string | undefined;
    events?: string[] | undefined;
    active?: boolean | undefined;
    contentType?: 'form' | 'json' | undefined;
    insecureSsl?: boolean | undefined;
    token?: string | undefined;
  },
  JsonObject
>;

// @public
export function createPublishGithubAction(options: {
  integrations: ScmIntegrationRegistry;
  config: Config;
  githubCredentialsProvider?: GithubCredentialsProvider;
}): TemplateAction<
  {
    repoUrl: string;
    description?: string | undefined;
    homepage?: string | undefined;
    access?: string | undefined;
    defaultBranch?: string | undefined;
    protectDefaultBranch?: boolean | undefined;
    protectEnforceAdmins?: boolean | undefined;
    deleteBranchOnMerge?: boolean | undefined;
    gitCommitMessage?: string | undefined;
    gitAuthorName?: string | undefined;
    gitAuthorEmail?: string | undefined;
    allowRebaseMerge?: boolean | undefined;
    allowSquashMerge?: boolean | undefined;
    squashMergeCommitTitle?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' | undefined;
    squashMergeCommitMessage?:
      | 'PR_BODY'
      | 'COMMIT_MESSAGES'
      | 'BLANK'
      | undefined;
    allowMergeCommit?: boolean | undefined;
    allowAutoMerge?: boolean | undefined;
    sourcePath?: string | undefined;
    bypassPullRequestAllowances?:
      | {
          users?: string[];
          teams?: string[];
          apps?: string[];
        }
      | undefined;
    requiredApprovingReviewCount?: number | undefined;
    restrictions?:
      | {
          users: string[];
          teams: string[];
          apps?: string[];
        }
      | undefined;
    requireCodeOwnerReviews?: boolean | undefined;
    dismissStaleReviews?: boolean | undefined;
    requiredStatusCheckContexts?: string[] | undefined;
    requireBranchesToBeUpToDate?: boolean | undefined;
    requiredConversationResolution?: boolean | undefined;
    repoVisibility?: 'internal' | 'private' | 'public' | undefined;
    collaborators?:
      | (
          | {
              user: string;
              access: string;
            }
          | {
              team: string;
              access: string;
            }
          | {
              username: string;
              access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
            }
        )[]
      | undefined;
    hasProjects?: boolean | undefined;
    hasWiki?: boolean | undefined;
    hasIssues?: boolean | undefined;
    token?: string | undefined;
    topics?: string[] | undefined;
    repoVariables?:
      | {
          [key: string]: string;
        }
      | undefined;
    secrets?:
      | {
          [key: string]: string;
        }
      | undefined;
    oidcCustomization?:
      | {
          useDefault: boolean;
          includeClaimKeys?: string[] | undefined;
        }
      | undefined;
    requiredCommitSigning?: boolean | undefined;
  },
  JsonObject
>;

// @public
export const createPublishGithubPullRequestAction: (
  options: CreateGithubPullRequestActionOptions,
) => TemplateAction<
  {
    title: string;
    branchName: string;
    targetBranchName?: string | undefined;
    description: string;
    repoUrl: string;
    draft?: boolean | undefined;
    targetPath?: string | undefined;
    sourcePath?: string | undefined;
    token?: string | undefined;
    reviewers?: string[] | undefined;
    teamReviewers?: string[] | undefined;
    commitMessage?: string | undefined;
    update?: boolean | undefined;
    forceFork?: boolean | undefined;
  },
  JsonObject
>;

// @public
const githubModule: () => BackendFeature;
export default githubModule;
```
